package esky.framework.cashew.web.action;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import esky.framework.cashew.service.ITestService;
import esky.framework.cashew.stereotype.Action;
import esky.framework.cashew.web.bind.annotation.Mapping;
import esky.framework.cashew.web.bind.annotation.RequestMethod;

@Action
@Mapping("/test2")
@Component
public class TestAction2 {

	@Autowired
	private ITestService test;

	@Mapping(value = "/findName", method = RequestMethod.GET)
	public Object findName() {
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("username", test.findName());
		return map;
	}
}
